﻿using System;
using System.Diagnostics;
using System.Text;

namespace Eflong.MonitoringLib.Common
{
    public class EflongLog
    {
        public EflongLog( )
        {
            // this.msg = msg;
        }

        public string msg { get; set; }

        public static void WriteMsg( string msg )
        {
            WriteMsg( msg , "Eflong" );
        }

        public static void WriteMsg( string msg , string name )
        {
            StringBuilder sb = new StringBuilder( );
            sb.Append( DateTime.Now.ToLongTimeString( ) );
            sb.Append( " -> " );
            sb.Append( name );
            sb.Append( " : " );
            sb.Append( msg );
            Console.WriteLine( sb.ToString( ) );
            Debug.WriteLine( sb.ToString( ) );
        }
    }
}